Checks that a token is surrounded by whitespace.